﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using LoanMonitor.Business;

namespace MortgageMonitor.Forms
{
    public partial class frmAccumulateMortgage : Form
    {
        public frmAccumulateMortgage()
        {
            InitializeComponent();
        }

        private void cmdUpdate_Click(object sender, EventArgs e)
        {
            try
            {
                DALclient client = new DALclient();
                client.UpdateAccumulateLoan(txtAccountNo.Text, Convert.ToDecimal(txtValue.TextBox1.Text), DateTime.Now);
                MessageBox.Show("OK!");
                txtAccountNo.Text = "059C00";
                txtAccountNo.Focus();
            }
            catch (System.Exception ex)
            {
                MessageBox.Show("ERROR: " + ex.Message);
            }            
        }

        private void cmdClose_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
